package com.ifugle.rap.application.service;

import java.util.List;
import com.ifugle.rap.application.api.UserPetApi;
import com.ifugle.rap.application.mapper.UserPetMapper;
import com.ifugle.rap.application.model.UserPet;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class UserPetService implements UserPetApi {

    @Autowired
    UserPetMapper userPetMapper;

    @Override
    public int deleteByPrimaryKey(Long id) {
        return userPetMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(UserPet record) {
        return userPetMapper.insert(record);
    }

    @Override
    public int insertSelective(UserPet record) {
        return userPetMapper.insertSelective(record);
    }

    @Override
    public UserPet selectByPrimaryKey(Long id) {
        return userPetMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<UserPet> selectByUserId(Long userId) {
        return userPetMapper.selectByUserId(userId);
    }

    @Override
    public int updateByPrimaryKeySelective(UserPet record) {
        return userPetMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(UserPet record) {
        return userPetMapper.updateByPrimaryKey(record);
    }

    @Override
    public int updateByUserIdAndPetId(UserPet record) {
        return userPetMapper.updateByUserIdAndPetId(record);
    }
}
